﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Master/Admin.Master" AutoEventWireup="true"
    CodeBehind="ListTextImgsList.aspx.cs" Inherits="Besture.UI.Admin.Content.ListTextImgsList" %>
<%@ Import Namespace="Besture.Common" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Content" runat="server">
    <div class="listPage">
        <!-- Begin 操作条 -->
        <%--<table style="float: left">
            <tr>
                <td>
                    <cms:ASPxButton ID="btnSelectAll_Head" runat="server" UseSubmitBehavior="False" AutoPostBack="False"
                        Text="选中全部">
                        <ClientSideEvents Click="function(s, e) { grid.SelectRows(); }" />
                    </cms:ASPxButton>
                </td>
                <td>
                    <cms:ASPxButton ID="btnUnSelectAll_Head" runat="server" UseSubmitBehavior="False"
                        AutoPostBack="False" Text="取消全部">
                        <ClientSideEvents Click="function(s, e) { grid.UnselectRows(); }" />
                    </cms:ASPxButton>
                </td>
                <td>
                    <cms:ASPxButton ID="btnDel_Head" runat="server" UseSubmitBehavior="False" Text="删除选中"
                        OnClick="btnDel_Click">
                        <ClientSideEvents Click="function(s, e) { e.processOnServer= confirm('删除后无法恢复，确定删除选中项吗?'); }" />
                    </cms:ASPxButton>
                </td>
                <td>
                    <cms:ASPxButton ID="btnAdd_Head" runat="server" UseSubmitBehavior="False" Text="添加"
                        OnClick="btnAdd_Click" />
                </td>
                <!--属性设置相关隐藏控件-->
                <td style="display: none">
                    <asp:TextBox runat="server" ID="txtProType"></asp:TextBox>
                    <asp:Button runat="server" Text="属性设置" ID="btnProButton" OnClick="btnProButton_Click" />
                </td>
            </tr>
        </table>--%>
        <div class="operateBar">
            <ul>
                <li><a href="javascript:grid.SelectRows();"><s class="icon-gou-gray"></s>全选</a></li>
                <li><a href="javascript:grid.UnselectRows();" class=""><s class="icon-cancel-gray"></s>
                    取消</a></li>
                <li>
                    <asp:LinkButton ID="lbAllDelete" runat="server" OnClientClick="return confirm('删除后无法恢复，确定删除选中项吗?');"
                        class="" OnClick="lbDel_Click"><s class="icon-delete-gray"></s>删除</asp:LinkButton>
                </li>
                <li>
                    <asp:LinkButton ID="lbAdd" runat="server" class="" OnClick="lbAdd_Click" ><s class="icon-add-gray"></s>添加</asp:LinkButton>
                </li>
                <li><a href="javascript:void(0);" class=""><s class="icon-export-gray"></s>导出</a></li>
            </ul>
        </div>
        <!-- //End 操作条 -->
        <!--显示下拉列表数据源-->
        <asp:SqlDataSource runat="server" ID="dataSourceDisplay"></asp:SqlDataSource>
        <!--网站置顶数据源-->
        <asp:SqlDataSource runat="server" ID="dataSourceWebStick"></asp:SqlDataSource>
        <!--栏目置顶数据源-->
        <asp:SqlDataSource runat="server" ID="dataSourceClassStick"></asp:SqlDataSource>
        <cms:ASPxGridView ID="grid" ClientInstanceName="grid" runat="server" Width="100%"
            AutoGenerateColumns="False" CssClass="table-module03" KeyFieldName="ID" OnCustomCallback="grid_CustomCallback"
            OnRowDeleting="grid_RowDeleting">
            <Columns>
                <cms:GridViewCommandColumn ShowSelectCheckbox="true" VisibleIndex="0" Width="50px"
                    FixedStyle="Left">
                    <HeaderTemplate>
                        <input type="checkbox" onclick="grid.SelectAllRowsOnPage(this.checked);" title="全选/全不选"
                            id="chkAll" runat="server" />
                    </HeaderTemplate>
                    <HeaderStyle HorizontalAlign="Center" />
                </cms:GridViewCommandColumn>
                <cms:GridViewCommandColumn VisibleIndex="1" Caption="删除" Width="85px" HeaderStyle-HorizontalAlign="Center"
                    CellStyle-HorizontalAlign="Center" ButtonType="Image" FixedStyle="Left">
                    <DeleteButton Visible="true" Image-Url="/Admin/Themes/images/icon-delete-green.png"
                        Text="删除">
                    </DeleteButton>
                </cms:GridViewCommandColumn>
                <cms:GridViewDataTextColumn Caption="操作" VisibleIndex="2" Width="85px" HeaderStyle-HorizontalAlign="Center"
                    CellStyle-HorizontalAlign="Center" FixedStyle="Left">
                    <DataItemTemplate>
                        <div class="operateBox">
                            <a class="btn-text" href="ListTextImgsSet.aspx?id=<%# Eval("ID") %>&partid=<%=PartID %>"
                                title="编辑">
                                <img src="/Admin/Themes/images/icon-edit-green.png" width="20" height="20" title="编辑"
                                    alt="编辑" style="cursor: pointer;" /></a>
                        </div>
                    </DataItemTemplate>
                </cms:GridViewDataTextColumn>
                <cms:GridViewDataTextColumn Caption="缩略图" VisibleIndex="2" Width="85px" HeaderStyle-HorizontalAlign="Center"
                    CellStyle-HorizontalAlign="Center" >
                    <DataItemTemplate>
                        <img src="<%# Constants.PATH_IMAGE_CONTENT+Eval("ImageUrl") %>" width="80" height="60" />
                    </DataItemTemplate>
                </cms:GridViewDataTextColumn>
                <cms:GridViewDataTextColumn Caption="标题" VisibleIndex="2" Width="243px" HeaderStyle-HorizontalAlign="Center"
                    CellStyle-HorizontalAlign="Left" >
                    <DataItemTemplate>
                       <h4><%# Eval("Name") %></h4>
						<p>发布时间：<%# Eval("CreateTime","{0:yyyy-MM-dd HH:mm:ss}") %></p>
                    </DataItemTemplate>
                </cms:GridViewDataTextColumn>
                <cms:GridViewDataTextColumn Caption="图片位置" VisibleIndex="3" Width="139px" HeaderStyle-HorizontalAlign="Center"
                    CellStyle-HorizontalAlign="Center" FieldName="SubName">
                    <Settings AutoFilterCondition="Contains"></Settings>
                </cms:GridViewDataTextColumn>
                <cms:GridViewDataTextColumn Caption="链接" VisibleIndex="4" Width="200px" HeaderStyle-HorizontalAlign="Center"
                    CellStyle-HorizontalAlign="Center" FieldName="LinkUrl">
                    <Settings AutoFilterCondition="Contains"></Settings>
                </cms:GridViewDataTextColumn>
            </Columns>
        </cms:ASPxGridView>
    </div>
    <%--<div class="mainbox">
        <!--顶部操作按钮开始-->
        <table style="float: left">
            <tr>
                <td>
                    <cms:ASPxButton ID="btnSelectAll_Head" runat="server" UseSubmitBehavior="False" AutoPostBack="False"
                        Text="选中全部">
                        <ClientSideEvents Click="function(s, e) { grid.SelectRows(); }" />
                    </cms:ASPxButton>
                </td>
                <td>
                    <cms:ASPxButton ID="btnUnSelectAll_Head" runat="server" UseSubmitBehavior="False"
                        AutoPostBack="False" Text="取消全部">
                        <ClientSideEvents Click="function(s, e) { grid.UnselectRows(); }" />
                    </cms:ASPxButton>
                </td>
                <td>
                    <cms:ASPxButton ID="btnDel_Head" runat="server" UseSubmitBehavior="False" Text="删除选中"
                        OnClick="btnDel_Click">
                        <ClientSideEvents Click="function(s, e) { e.processOnServer= confirm('删除后无法恢复，确定删除选中项吗?'); }" />
                    </cms:ASPxButton>
                </td>
                <td>
                    <cms:ASPxButton ID="btnAdd_Head" runat="server" UseSubmitBehavior="False" Text="添加"
                        OnClick="btnAdd_Click" />
                </td>
                <!--属性设置相关隐藏控件-->
                <td style="display: none">
                    <asp:TextBox runat="server" ID="txtProType"></asp:TextBox>
                    <asp:Button runat="server" Text="属性设置" ID="btnProButton" OnClick="btnProButton_Click" />
                </td>
            </tr>
        </table>
        <table style="float: right; margin-right: 10px;">
            <tr>
                <td>
                    <div class="slidedown">
                        <input class="slidedownbtn" type="button" value="相关设置" />
                        <div class="slidedownmenu">
                            <ul>
                                <li><a href="javascript:ProSet('1')" >显示</a></li>
                                <li><a href="javascript:ProSet('2')" >隐藏</a></li>
                            </ul>
                            <ul>
                                <li><a href="javascript:ProSet('3')" >网站置顶</a></li>
                                <li><a href="javascript:ProSet('4')" >取消置顶</a></li>
                            </ul>
                            <ul>
                                <li><a href="javascript:ProSet('5')" >栏目置顶</a></li>
                                <li><a href="javascript:ProSet('6')" >取消置顶</a></li>
                            </ul>
                        </div>
                    </div>
                </td>
            </tr>
        </table>
        <!--顶部操作按钮结束-->
        <!--显示下拉列表数据源-->
        <asp:SqlDataSource runat="server" ID="dataSourceDisplay"></asp:SqlDataSource>
        <!--网站置顶数据源-->
        <asp:SqlDataSource runat="server" ID="dataSourceWebStick"></asp:SqlDataSource>
        <!--栏目置顶数据源-->
        <asp:SqlDataSource runat="server" ID="dataSourceClassStick"></asp:SqlDataSource>
        <cms:ASPxGridView ID="grid" ClientInstanceName="grid" runat="server" Width="99%"
            AutoGenerateColumns="False" KeyFieldName="ID" OnCustomCallback="grid_CustomCallback"
            OnRowDeleting="grid_RowDeleting">
            <Columns>
                <cms:GridViewCommandColumn ShowSelectCheckbox="true" VisibleIndex="0" Width="50px"
                    FixedStyle="Left">
                    <HeaderTemplate>
                        <input type="checkbox" onclick="grid.SelectAllRowsOnPage(this.checked);" title="全选/全不选"
                            id="chkAll" runat="server" />
                    </HeaderTemplate>
                    <HeaderStyle HorizontalAlign="Center" />
                </cms:GridViewCommandColumn>
                <cms:GridViewCommandColumn VisibleIndex="1" Caption="删除" Width="50px" HeaderStyle-HorizontalAlign="Center"
                    CellStyle-HorizontalAlign="Center" ButtonType="Image" FixedStyle="Left">
                    <DeleteButton Visible="true" Image-Url="/Admin/Themes/Images/del.gif" Text="删除">
                    </DeleteButton>
                </cms:GridViewCommandColumn>
                <cms:GridViewDataTextColumn Caption="编辑" VisibleIndex="2" Width="50px" HeaderStyle-HorizontalAlign="Center"
                    CellStyle-HorizontalAlign="Center" FixedStyle="Left">
                    <DataItemTemplate>
                        <a href="PartContentSet.aspx?id=<%# Eval("ID") %>&partid=<%=PartID %>">
                            <img src="/Admin/Themes/Images/edit.gif" alt="查看编辑" title="查看编辑" /></a>
                    </DataItemTemplate>
                </cms:GridViewDataTextColumn>
                <cms:GridViewDataTextColumn Caption="标题" VisibleIndex="3" HeaderStyle-HorizontalAlign="Center"
                    CellStyle-HorizontalAlign="Left" FieldName="Name">
                    <Settings AutoFilterCondition="Contains"></Settings>
                </cms:GridViewDataTextColumn>
                <cms:GridViewDataTextColumn Caption="栏目" VisibleIndex="4" Width="100px" HeaderStyle-HorizontalAlign="Center"
                    CellStyle-HorizontalAlign="Center" FieldName="PartName">
                    <Settings AutoFilterCondition="Contains"></Settings>
                </cms:GridViewDataTextColumn>
                <cms:GridViewDataComboBoxColumn Caption="显示" VisibleIndex="5" Width="80px" HeaderStyle-HorizontalAlign="Center"
                    CellStyle-HorizontalAlign="Center" FieldName="IsDisplay">
                    <PropertiesComboBox TextField="Name" ValueField="Value" DataSourceID="dataSourceDisplay"
                        IncrementalFilteringMode="StartsWith" ValueType="System.Int32" DropDownStyle="DropDown">
                    </PropertiesComboBox>
                </cms:GridViewDataComboBoxColumn>
                <cms:GridViewDataComboBoxColumn Caption="网站置顶" VisibleIndex="6" Width="80px" HeaderStyle-HorizontalAlign="Center"
                    CellStyle-HorizontalAlign="Center" FieldName="WebStick">
                    <PropertiesComboBox TextField="Name" ValueField="Value" DataSourceID="dataSourceWebStick"
                        IncrementalFilteringMode="StartsWith" ValueType="System.Int32" DropDownStyle="DropDown">
                    </PropertiesComboBox>
                </cms:GridViewDataComboBoxColumn>
                <cms:GridViewDataComboBoxColumn Caption="栏目置顶" VisibleIndex="7" Width="80px" HeaderStyle-HorizontalAlign="Center"
                    CellStyle-HorizontalAlign="Center" FieldName="ClassStick">
                    <PropertiesComboBox TextField="Name" ValueField="Value" DataSourceID="dataSourceClassStick"
                        IncrementalFilteringMode="StartsWith" ValueType="System.Int32" DropDownStyle="DropDown">
                    </PropertiesComboBox>
                </cms:GridViewDataComboBoxColumn>
                <cms:GridViewDataDateColumn Caption="创建时间" VisibleIndex="9" Width="200px" HeaderStyle-HorizontalAlign="Center"
                    CellStyle-HorizontalAlign="Center" FieldName="CreateTime">
                    <PropertiesDateEdit DisplayFormatString="{0:yyyy-MM-dd HH:mm:ss}">
                    </PropertiesDateEdit>
                </cms:GridViewDataDateColumn>
            </Columns>
        </cms:ASPxGridView>
        <!--底部操作按钮开始-->
        <table style="float: left">
            <tr>
                <td>
                    <cms:ASPxButton ID="btnSelectAll_Foot" runat="server" UseSubmitBehavior="False" AutoPostBack="False"
                        Text="选中全部">
                        <ClientSideEvents Click="function(s, e) { grid.SelectRows(); }" />
                    </cms:ASPxButton>
                </td>
                <td>
                    <cms:ASPxButton ID="btnUnSelectAll_Foot" runat="server" UseSubmitBehavior="False"
                        AutoPostBack="False" Text="取消全部">
                        <ClientSideEvents Click="function(s, e) { grid.UnselectRows(); }" />
                    </cms:ASPxButton>
                </td>
                <td>
                    <cms:ASPxButton ID="btnDel_Foot" runat="server" UseSubmitBehavior="False" Text="删除选中"
                        OnClick="btnDel_Click">
                        <ClientSideEvents Click="function(s, e) { e.processOnServer= confirm('删除后无法恢复，确定删除选中项吗?'); }" />
                    </cms:ASPxButton>
                </td>
                <td>
                    <cms:ASPxButton ID="btnAdd_Foot" runat="server" UseSubmitBehavior="False" Text="添加"
                        OnClick="btnAdd_Click" />
                </td>
            </tr>
        </table>
        <!--底部操作按钮结束-->
    </div>
    <script type="text/javascript">
        $(function () {
            $(".slidedownbtn").live("click", function () {
                $(".slidedownmenu").fadeIn();
            });

            $(".slidedown").live("mouseleave", function() {
                $(".slidedownmenu").fadeOut();
            });
        });

        function ProSet(proType) {
            $("#<%=txtProType.ClientID %>").val(proType);
            $("#<%=btnProButton.ClientID %>").click();
        }
    </script>--%>

</asp:Content>
